package com.hc.tenant.service.impl;

import java.util.List;
import com.hc.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hc.tenant.mapper.LocationMapper;
import com.hc.tenant.domain.Location;
import com.hc.tenant.service.ILocationService;

/**
 * 坐标管理Service业务层处理
 * 
 * @author yongjianz
 * @date 2021-03-26
 */
@Service
public class LocationServiceImpl implements ILocationService 
{
    @Autowired
    private LocationMapper locationMapper;

    /**
     * 查询坐标管理
     * 
     * @param locationId 坐标管理ID
     * @return 坐标管理
     */
    @Override
    public Location selectLocationById(Long locationId)
    {
        return locationMapper.selectLocationById(locationId);
    }

    /**
     * 查询坐标管理列表
     * 
     * @param location 坐标管理
     * @return 坐标管理
     */
    @Override
    public List<Location> selectLocationList(Location location)
    {
        return locationMapper.selectLocationList(location);
    }

    /**
     * 新增坐标管理
     * 
     * @param location 坐标管理
     * @return 结果
     */
    @Override
    public int insertLocation(Location location)
    {
        location.setCreateTime(DateUtils.getNowDate());
        return locationMapper.insertLocation(location);
    }

    /**
     * 修改坐标管理
     * 
     * @param location 坐标管理
     * @return 结果
     */
    @Override
    public int updateLocation(Location location)
    {
        location.setUpdateTime(DateUtils.getNowDate());
        return locationMapper.updateLocation(location);
    }

    /**
     * 批量删除坐标管理
     * 
     * @param locationIds 需要删除的坐标管理ID
     * @return 结果
     */
    @Override
    public int deleteLocationByIds(Long[] locationIds)
    {
        return locationMapper.deleteLocationByIds(locationIds);
    }

    /**
     * 删除坐标管理信息
     * 
     * @param locationId 坐标管理ID
     * @return 结果
     */
    @Override
    public int deleteLocationById(Long locationId)
    {
        return locationMapper.deleteLocationById(locationId);
    }
}
